function render_controls(this)
%RENDER_CONTROLS Render the Convert Dialog specific UIcontrols

%   Author(s): J. Schickler
%   Copyright 1988-2004 The MathWorks, Inc.
%   $Revision: 1.6.4.2 $  $Date: 2004/12/26 22:20:50 $

h    = get(this,'Handles');
hFig = get(this,'FigureHandle');
sz   = gui_sizes(this);

% Render the listbox in the "Convert To" frame.
strs = getconvertstructchoices(this);

cbs = callbacks(this);

h.label   = uicontrol(hFig, ...
    'Style',  'text', ...
    'String', 'Convert to:', ...
    'HorizontalAlignment', 'Left', ...
    'Tag',    'convertto_label');

h.listbox = uicontrol(hFig,...
    'Style','listbox',...
    'BackgroundColor','White',...
    'String',strs,...
    'Tag','convertto_listbox',...
    'CallBack',{cbs.listbox, this});

set(this,'Handles',h);

hd = get(this, 'DialogHandles');

hLayout = siglayout.gridbaglayout(hFig, ...
    'HorizontalWeights', [1 0], ...
    'VerticalWeights', [0 1 0], ...
    'HorizontalGap', 5*sz.pixf, ...
    'VerticalGap',   5*sz.pixf);

wd = largestuiwidth([hd.ok hd.cancel])+12*sz.pixf;

hLayout.add(h.label, 1, [1 2], ...
    'MinimumHeight', sz.uh-sz.lblTweak, ...
    'Fill', 'Horizontal');

hLayout.add(h.listbox, 2, [1 2], ...
    'TopInset', -5*sz.pixf, ...
    'Fill', 'Both');

hLayout.add(hd.ok, 3, 1, ...
    'MinimumHeight', sz.bh, ...
    'MinimumWidth', wd, ...
    'Anchor', 'East');

hLayout.add(hd.cancel, 3, 2, ...
    'MinimumHeight', sz.bh, ...
    'MinimumWidth',  wd);

cshelpcontextmenu(this, 'fdatool_convertto_listbox');

update_listbox(this);

listeners = [ ...
    handle.listener(this, this.findprop('TargetStructure'), ...
    'PropertyPostSet', @targetstructure_listener); ...
    handle.listener(this, this.findprop('Filter'), ...
    'PropertyPostSet', @filter_listener); ...
    ];

set(listeners, 'CallbackTarget', this);
set(this, 'WhenRenderedListeners', listeners);

% [EOF]
